package org.example.controller;

import org.example.pojo.Mail;
import org.example.service.MailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class MailController {
    @Autowired
    MailService mailService;
    @PostMapping("/sendSimpleMail")
    public String sendSimpleMail(Mail mail){
        mailService.sendSimpleMailMessage(mail);
        return "简单邮件发送成功";
    }
    @PostMapping("/sendMailWithFile")
    public String sendMailWithFile(Mail mail){
        mailService.sendMailWithFile(mail);
        return "邮件发送成功";
    }
}
